home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
SGI Developer Toolbox 6.1
/
SGI Developer Toolbox 6.1 - Disc 3.iso
/
bin
/
set_names
< prev
next >
Wrap
Text File
|
1996-11-11
|
300b
|
16 lines
#!/bin/perl
$ENV{'PATH'} = "/usr/bsd:/bin/:/usr/bin:/usr/sbin:/usr/bin/X11";
$ENV{'HOSTRESORDER'} = "$ARGV[0]";
if (open(IN, "/etc/sys_id")) {
$name = <IN>;
chop($name);
($name) = gethostbyname($name);
close(IN);
}
if ($name =~ /([^\.]*)\.(.*)/) {
print "$1 $2\n";
} else {
print "$name\n"
}